<?php
class Connectionmodel extends CI_Model {

	function __contruct(){
		parent::__construct();
	}

	function loadDatabase() {
		$this->load->database();
	}

	function closeDatabase() {
		$this->db->close();
	}

	function executeQuery($aryIndentifier, $aryBin = NULL) {

		$readFile = parse_ini_file($aryIndentifier['file_name']);
		$sql = $readFile[$aryIndentifier['param']];

		$result = $this->db->query($sql, $aryBin);
		return $result->result_array();
	}

	function executeQuerySingle($aryIndentifier, $aryBin = NULL) {

		$readFile = parse_ini_file($aryIndentifier['file_name']);
		$sql = $readFile[$aryIndentifier['param']];

		$result = $this->db->query($sql, $aryBin);
		return $result->row_array();
	}
}
?>